<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
defined('BASEPATH') || exit('No direct script access allowed');
?>
  <div class="user-body">
  	<div class="body-content">
      <div class="safe-info">
        <div class="icon" style="display:none;"><img src="/static/images/level_<?php echo $level - 1 <= 0 ? 1 : $level - 1;?>.png"></div>
        <div class="txt">
        	<ul>
        	  <li class="safe-uid"><span>UID：<?php echo $user['id'];?></span></li>
			  <li class="last-login">推广链接：<?php echo site_url('user/reg');?>?uid=<?php echo $user['id'];?></li>
			</ul>
			<div class="tips">
			<p><?php echo lang('user_notice_1');?> <strong><?php echo $level;?></strong> <?php echo lang('user_notice_2');?>，<?php echo lang('user_notice_3');?> <strong><?php echo $not_set;?></strong> <?php echo lang('user_notice_4');?></p>
			</div>
			<div class="clear"></div>
        </div>
        <div class="clear"></div>
      </div>
      <div class="safe-items">
	      <table>
				<tbody>
					<tr>
						<td>
						    <table class="safe-item" cellspacing=0 cellpadding=0 border=0>
							    <tr>
							    	<th colspan=2>
								    	<?php echo lang('user_password_tit');?>								    	<a id="set_password"><?php echo lang('user_modify');?></a>
								    	<div class="clear"></div>
							    	</th>
							    </tr>
							    <tr class="is-set">
								    <td><i class="fa fa-unlock-alt icon-logo"></i></td>
									<td>
										<h3><i class="fa fa-check-circle"></i><?php echo lang('user_is_set');?></h3>
										<p><?php echo lang('user_sign_password_info');?></p>
									</td>
								</tr>
							</table>
					    </td>
					    <td>
					    	<table class="safe-item" cellspacing=0 cellpadding=0 border=0>
							    <tr>
							    	<th colspan=2>
								    	<?php echo lang('user_paypwd_tit');?>										<a id="set_paypwd"><?php echo !$user['paypwd'] ? lang('user_set') : lang('user_modify');?></a>
										<div class="clear"></div>
							    	</th>
							    </tr>
							    <tr class="
<?php
if ($user['paypwd']) {
?>is-set<?php
}
else {
?>not-set<?php
}

?>">
								    <td><i class="fa fa-unlock-alt icon-logo"></i></td>
									<td>
										<h3><i class="fa fa-check-circle"></i>
<?php
if ($user['paypwd']) {
?><?php echo lang('user_is_set');?><?php
}
else {
?><?php echo lang('user_not_set');?><?php
}

?></h3>
										<p><?php echo lang('user_pay_password_info');?></p>
									</td>
								</tr>
							</table>
						</td>
						<td>
							<table class="safe-item" cellspacing=0 cellpadding=0 border=0>
							    <tr>
							    	<th colspan=2>
								    	<?php echo lang('user_mobile_tit');?>										<a id="set_mobile"><?php echo !$user['mobile'] ? lang('user_bind') : lang('user_modify');?></a>
										<div class="clear"></div>
							    	</th>
							    </tr>
							    <tr class="
<?php
if ($user['mobile']) {
?>is-set<?php
}
else {
?>not-set<?php
}

?>">
								    <td><i class="fa fa-tablet icon-logo"></i></td>
									<td>
										<h3><i class="fa fa-check-circle"></i>
<?php
if ($user['mobile']) {
?><?php echo lang('user_is_add');?><?php
}
else {
?><?php echo lang('user_not_add');?><?php
}

?></h3>
										<p><?php echo lang('user_mobile_info');?></p>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<table class="safe-item" cellspacing=0 cellpadding=0 border=0>
							    <tr>
							    	<th colspan=2>
								    	<?php echo lang('user_real_tit');?>								    	
<?php
if ($is_real == 0) {
?>								    	<a href="<?php echo site_url('safe/pic');?>"><?php echo lang('user_verify');?></a>
								    	<?php
}
else {
	if (($is_real == 1) && ($apply_status == 0)) {
?>								    	<a href="<?php echo site_url('safe/pic');?>">查看审核信息</a>
								    	<?php
	}
	else {
		if (($is_real == 1) && ($apply_status == 2)) {
?>								    	<a href="<?php echo site_url('safe/pic');?>">未通过，继续认证</a>
								    	<?php
		}
	}
}

?>										<div class="clear"></div>
							    	</th>
							    </tr>
							    <tr class="<?php
if (($is_real == 1) && ($apply_status == 1)) {
?>is-set<?php
}
else {
?>not-set<?php
}

?>">
								    <td><i class="fa fa-address-book-o icon-logo"></i></td>
									<td>
										<h3><i class="fa fa-check-circle"></i><?php
if (($is_real == 1) && ($apply_status == 1)) {
?><?php echo lang('user_is_verify');?><?php
}
else {
	if (($is_real == 1) && ($apply_status == 0)) {
?>正在审核中<?php
	}
	else {
?><?php echo lang('user_not_verify');?><?php
	}
}

?></h3>
										<p><?php echo lang('user_real_info');?></p>
									</td>
								</tr>
							</table>
						</td>
						<td>
							<table class="safe-item" cellspacing=0 cellpadding=0 border=0>
							    <tr>
							    	<th colspan=2>
								    	<?php echo lang('user_email_tit');?>								    	<a id="set_email"><?php echo !$user['email'] ? lang('user_bind') : lang('user_modify');?></a>
										<div class="clear"></div>
							    	</th>
							    </tr>
							    <tr class="
<?php
if ($user['email']) {
?>is-set<?php
}
else {
?>not-set<?php
}

?>">
								    <td><i class="fa fa-envelope-o icon-logo"></i></td>
									<td>
										<h3 class="is-set"><i class="fa fa-check-circle"></i>
<?php
if ($user['email']) {
?><?php echo lang('user_is_add');?><?php
}
else {
?><?php echo lang('user_not_add');?><?php
}

?></h3>
										<p><?php echo lang('user_email_info');?></p>
									</td>
								</tr>
							</table>
						</td>
						<td></td>
					</tr>
				</tbody>
			</table>
		</div>
    </div>
  </div>
  <div class="clear"></div>
</div>

<script type="text/javascript">
$(function(){
	$('#set_password').winEdit('<?php echo site_url('safe/password');?>','550','353','修改密码');
	$('#set_paypwd').winEdit('<?php echo site_url('safe/paypwd');?>','550','353','修改安全密码');
	$('#set_email').winEdit('<?php echo site_url('safe/email');?>','570','394','绑定邮箱');
	$('#set_mobile').winEdit('<?php echo site_url('safe/mobile');?>','550','376','绑定手机');
	$('#set_real').winEdit('<?php echo site_url('safe/real');?>','550','438','实名认证');
	$('#set_pic').winEdit('<?php echo site_url('safe/pic');?>','900','603','照片认证');
});
</script>